<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">
    <h:head>
        <title>Sistema de Avaliação</title>
    </h:head>
    <h:body>
        <h1>Avaliações do #{avaliacaoBean.colaborador.nome}</h1>
        <p:dataTable var="avaliacao" value="#{avaliacaoBean.listaAvaliacao}">
            <p:column headerText="ID">
                <h:outputText value="#{avaliacao.id}" />
            </p:column>
            <p:column headerText="Data">
                <h:outputText  value="#{avaliacao.referencia}" />
            </p:column>
            <p:column headerText="Opções">
                <h:form>
                    <h:inputHidden value="#{avaliacaoBean.colaborador.id}" />
                    <p:splitButton value="Editar" action="#{avaliacaoBean.prepararAlterarAvaliacao}" ajax="false" icon="ui-icon-arrowrefresh-1-w">
                        <p:menuitem value="Excluir" action="#{avaliacaoBean.excluir}" ajax="false" icon="ui-icon-close" />
                    </p:splitButton>
                </h:form>
            </p:column>
        </p:dataTable>
    </h:body>
</html>

